//
//  LBHorizontalLayoutViewController.m
//  TEXT
//
//  Created by mac on 2024/5/19.
//  Copyright © 2024 刘博. All rights reserved.
//

#import "LBHorizontalLayoutViewController2.h"
#import "LBHorizontalLayout.h"
#import "LBHorizontalLayoutCollectionViewCell.h"
#import "LBLoadingCheckView.h"

@interface LBHorizontalLayoutViewController2 () <UICollectionViewDelegate, UICollectionViewDataSource, LBCollectionViewBaseLayoutDelegate>

@property (nonatomic, strong) UICollectionView *collectionView;

@property (nonatomic, strong) NSArray *dataArray;

@end

@implementation LBHorizontalLayoutViewController2

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self setUpUI];
    // Do any additional setup after loading the view.
}
- (void)setUpUI
{
     self.view.backgroundColor = [UIColor whiteColor];
     LBLoadingCheckView *loadView = [[LBLoadingCheckView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
    loadView.frame = CGRectMake(100, 100, 100, 100);
//    loadView.backgroundColor = [UIColor cyanColor];
     //self.view.backgroundColor = [UIColor whiteColor];
     [self.view addSubview:loadView];
     __block CGFloat progress = 0;
     NSTimer *timer = [NSTimer timerWithTimeInterval:0.1 repeats:YES block:^(NSTimer * _Nonnull timer) {
         if (progress >= 1) {
             return;
         }
         NSLog(@"哈哈哈进度进度%f", progress);
         [loadView showProgress:progress];
         progress += 0.1;

     }];
     [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
}

@end
